package com.lwc.config;

import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//生产者
@Configuration
public class Rabbitconfig {

    @Bean
public Queue queue(){
    return  new Queue("normal-queue");
}
    @Bean
    public DirectExchange todirectExchange(){
        return  new DirectExchange("normal-ex");
    }
@Bean
    public Binding  normal(DirectExchange directExchange,Queue queue){
     return BindingBuilder.bind(queue).to(directExchange).with("normalqueue");
    }


}
